﻿<Window x:Class="WITD.Categories"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="Categories"
        Width="659"
        Height="462"
        Activated="Window_Activated"
        ResizeMode="NoResize"
        Topmost="True"
        WindowStartupLocation="CenterOwner"
        WindowStyle="ToolWindow">
    <Grid Width="655"
          Height="440"
          Background="#41000000">

        <ListBox Name="lstWorkItemTypes"
                 Width="258"
                 Height="234"
                 Margin="380,24,0,0"
                 HorizontalAlignment="Left"
                 VerticalAlignment="Top"
                 IsTabStop="True"
                 SelectionChanged="lstWorkItemTypes_SelectionChanged"
                 SelectionMode="Multiple"
                 TabIndex="5"
                 ToolTip=" List of work item types assigned to this project" />
        <Button Name="btnClose"
                Width="122"
                Height="23"
                Margin="514,405,0,0"
                HorizontalAlignment="Left"
                VerticalAlignment="Top"
                Click="btnClose_Click"
                Content="Close"
                TabIndex="7"
                ToolTip="Close this window." />
        <TreeView Name="tvCategories"
                  Width="318"
                  Height="234"
                  Margin="12,24,0,0"
                  HorizontalAlignment="Left"
                  VerticalAlignment="Top"
                  SelectedItemChanged="tvCategories_SelectedItemChanged"
                  TabIndex="0"
                  ToolTip="List of work item categories for this project along with their assigned work item types"
                  UseLayoutRounding="True">
            <TreeView.ItemContainerStyle>
                <Style TargetType="{x:Type TreeViewItem}">
                    <!--  Style for the selected item  -->
                    <Setter Property="BorderThickness" Value="1" />
                    <Style.Triggers>
                        <!--  Selected and has focus  -->
                        <Trigger Property="IsSelected" Value="True">
                            <Setter Property="BorderBrush" Value="#7DA2CE" />
                        </Trigger>
                        <!--  Mouse over  -->

                        <!--  Selected but does not have the focus  -->
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="IsSelected" Value="True" />
                                <Condition Property="IsSelectionActive" Value="False" />
                            </MultiTrigger.Conditions>
                            <Setter Property="BorderBrush" Value="#D9D9D9" />
                        </MultiTrigger>
                    </Style.Triggers>
                    <Style.Resources>
                        <Style TargetType="Border">
                            <Setter Property="CornerRadius" Value="2" />
                        </Style>
                    </Style.Resources>
                </Style>
            </TreeView.ItemContainerStyle>
            <TreeView.Resources>
                <!--  Brushes for the selected item  -->
                <LinearGradientBrush x:Key="{x:Static SystemColors.HighlightBrushKey}" StartPoint="0,0" EndPoint="0,1">
                    <GradientStop Offset="0" Color="#FFDCEBFC" />
                    <GradientStop Offset="1" Color="#FFC1DBFC" />
                </LinearGradientBrush>
                <LinearGradientBrush x:Key="{x:Static SystemColors.ControlBrushKey}" StartPoint="0,0" EndPoint="0,1">
                    <GradientStop Offset="0" Color="#FFF8F8F8" />
                    <GradientStop Offset="1" Color="#FFE5E5E5" />
                </LinearGradientBrush>
                <SolidColorBrush x:Key="{x:Static SystemColors.HighlightTextBrushKey}" Color="Black" />
                <SolidColorBrush x:Key="{x:Static SystemColors.ControlTextBrushKey}" Color="Black" />
            </TreeView.Resources>
        </TreeView>
        <Button Name="btnRemoveWIT"
                Width="159"
                Height="23"
                Margin="171,263,0,0"
                HorizontalAlignment="Left"
                VerticalAlignment="Top"
                Click="btnRemoveWIT_Click"
                Content="Remove WITD from Category"
                TabIndex="1"
                ToolTip="Remove the selected work item type from the item category." />
        <Button Name="btnChangeDefault"
                Width="159"
                Height="23"
                Margin="171,289,0,0"
                HorizontalAlignment="Left"
                VerticalAlignment="Top"
                Click="btnChangeDefault_Click"
                Content="Change default WITD"
                TabIndex="3"
                ToolTip="Change the default workitem type for the item category to the selected work item type." />
        <Button Name="btnAddWIT"
                Width="45"
                Height="44"
                Margin="333,119,0,0"
                HorizontalAlignment="Left"
                VerticalAlignment="Top"
                Click="btnAddWIT_Click"
                Content="&lt;"
                FontWeight="Bold"
                ToolTip="Click to assign the selected WITDs from the right list to the selected category in the left list." />
        <Button Name="btnRemoveCategory"
                Width="159"
                Height="23"
                Margin="12,289,0,0"
                HorizontalAlignment="Left"
                VerticalAlignment="Top"
                Click="btnRemoveCategory_Click"
                Content="Remove category"
                TabIndex="2"
                ToolTip="Remove the selected category" />
        <Button Name="btnExportCategories"
                Width="159"
                Height="23"
                Margin="12,315,0,0"
                HorizontalAlignment="Left"
                VerticalAlignment="Top"
                Click="btnExportCategories_Click"
                Content="Export categories to file"
                ToolTip="Export all categories for this project to a file." />

        <Rectangle Name="rectangle1"
                   Width="665"
                   Height="1"
                   Margin="0,397,0,0"
                   HorizontalAlignment="Left"
                   VerticalAlignment="Top"
                   Stroke="Black" />
        <Label Name="label1"
               Width="317"
               Height="28"
               Margin="12,0,0,0"
               HorizontalAlignment="Left"
               VerticalAlignment="Top"
               Content="Categories and assigned WITDs (work item type definitions)" />
        <Label Name="label2"
               Width="258"
               Height="28"
               Margin="380,0,0,0"
               HorizontalAlignment="Left"
               VerticalAlignment="Top"
               Content="Project WITDs (work item type definitions)" />
        <Button Name="btnAddCategory"
                Width="159"
                Height="23"
                Margin="12,263,0,0"
                HorizontalAlignment="Left"
                VerticalAlignment="Top"
                Click="btnAddCategory_Click"
                Content="Add category"
                TabIndex="4"
                ToolTip="Add a new category with a default work item type." />
        <Label Name="label3"
               Width="187"
               Height="24"
               Margin="12,344,0,0"
               HorizontalAlignment="Left"
               VerticalAlignment="Top"
               VerticalContentAlignment="Top"
               Content="Selected category reference name:" />
        <Button Name="btnRename"
                Width="129"
                Height="23"
                Margin="380,263,0,0"
                HorizontalAlignment="Left"
                VerticalAlignment="Top"
                Click="btnRename_Click"
                Content="Rename"
                TabIndex="1"
                ToolTip="Rename the currently selected work item type to a new name" />
        <Button Name="btnDestroyWIT"
                Width="129"
                Margin="509,263,0,154"
                HorizontalAlignment="Left"
                Click="btnDestroyWIT_Click"
                Content="Destroy"
                TabIndex="2"
                ToolTip="Destroy the currently selected WITDs from the current project" />
        <Button Name="btnImport"
                Width="129"
                Height="23"
                Margin="380,289,0,0"
                HorizontalAlignment="Left"
                VerticalAlignment="Top"
                Click="btnImport_Click"
                Content="Validate &amp; Import WITD"
                TabIndex="3"
                ToolTip="Validate &amp; import a WITD from a file, or just validate a WITD." />
        <Button Name="btnExport"
                Width="129"
                Height="23"
                Margin="380,315,0,0"
                HorizontalAlignment="Left"
                VerticalAlignment="Top"
                Click="btnExport_Click"
                Content="Export selected WITDs"
                TabIndex="4"
                ToolTip="Export the currently selected WITDs to individual files" />
        <CheckBox Name="chkValidateOnly"
                  Width="130"
                  Height="16"
                  Margin="514,293,0,0"
                  HorizontalAlignment="Left"
                  VerticalAlignment="Top"
                  Checked="chkValidateOnly_Checked"
                  Content="Validate WITD only"
                  TabIndex="5"
                  ToolTip="Check this to perform validation of the WITD against the project only when clicking the Validate WITD only button. Do not import. Errors will be displayed."
                  Unchecked="chkValidateOnly_Unchecked" />
        <Button Name="btnRefresh"
                Width="159"
                Height="23"
                Margin="12,405,0,0"
                HorizontalAlignment="Left"
                VerticalAlignment="Top"
                Click="btnRefresh_Click"
                Content="Refresh content"
                TabIndex="9"
                ToolTip="Refresh the cache and repopulate the list of work item types. If the sync fails, it reconnects to the collection." />
        <Button Name="btnRebuildcache"
                Width="159"
                Height="23"
                Margin="171,405,0,0"
                HorizontalAlignment="Left"
                VerticalAlignment="Top"
                Click="btnRebuildcache_Click"
                Content="Rebuild cache"
                TabIndex="8"
                ToolTip="Rebuilds the cache using WITAdmin and repopulates the list of work item types. Use sparingly on production systems during business hours." />
        <TextBox Name="txtRefNameForSelectedCat"
                 Width="317"
                 Height="23"
                 Margin="12,366,0,0"
                 HorizontalAlignment="Left"
                 VerticalAlignment="Top"
                 IsReadOnly="True"
                 ToolTip="Displays the reference name for the currently selected project category." />
        <Button Name="btnExportAllWITDs"
                Width="129"
                Height="23"
                Margin="380,341,0,0"
                HorizontalAlignment="Left"
                VerticalAlignment="Top"
                Click="btnExportAllWITDs_Click"
                Content="Export all WITDs"
                ToolTip="Export all WITDs from this project to individual files." />
        <Rectangle Name="rectangle2"
                   Width="123"
                   Height="50"
                   Margin="513,314,0,0"
                   HorizontalAlignment="Left"
                   VerticalAlignment="Top"
                   Stroke="Black"
                   ToolTip="Options that govern how WITDs are exported to files." />
        <CheckBox Name="chkIncludeGlobalLists"
                  Width="113"
                  Height="16"
                  Margin="516,328,0,0"
                  HorizontalAlignment="Left"
                  VerticalAlignment="Top"
                  Content="Include global lists"
                  TabIndex="6"
                  ToolTip="Check to include the global list for this project's collection in the file(s)" />
        <CheckBox Name="chkOverwriteAll"
                  Width="118"
                  Height="16"
                  Margin="516,347,0,0"
                  HorizontalAlignment="Left"
                  VerticalAlignment="Top"
                  Content="Overwrite all"
                  ToolTip="Check to overwrite WITHOUT WARNING any same-named files that exist in the folder to which you select to export the project's WITDs." />
        <Label Name="label4"
               Width="113"
               Height="23"
               Margin="514,308,0,0"
               HorizontalAlignment="Left"
               VerticalAlignment="Top"
               HorizontalContentAlignment="Center"
               VerticalContentAlignment="Top"
               Content="Export Options:" />
    </Grid>
</Window>
